home *** CD-ROM | disk | FTP | other *** search
/ The Netter Presenter: Ur…ion in Overactive Bladder / The Netter Presenter: Urinary System - Structure & Function in Overactive Bladder.iso / mac / UrinarySystem.app / Contents / Main.dxr / Internal_14_Select List.ls < prev    next >
Encoding:
Text File  |  2005-01-18  |  3.3 KB  |  101 lines

  1. global gSelectListDialog, glPFListNames, gCurrentList
  2.  
  3. on setupSelectListDialog
  4.   gSelectListDialog = new(xtra("MUI"))
  5.   if objectp(gSelectListDialog) then
  6.     SelectListDialogWinPropList = GetWindowPropList(gSelectListDialog)
  7.     SelectListDialogWinPropList.name = "Select List"
  8.     SelectListDialogWinPropList.callback = "SelectListDialogCallBack"
  9.     SelectListDialogWinPropList.mode = #pixel
  10.     SelectListDialogWinPropList.closeBox = 1
  11.     SelectListDialogWinPropList.modal = 1
  12.     SelectListDialogWinPropList.xPosition = 359
  13.     SelectListDialogWinPropList.yPosition = 267
  14.     SelectListDialogWinPropList.width = 298
  15.     SelectListDialogWinPropList.height = 78
  16.     myWindowItemList = []
  17.     tempItemProps = GetItemPropList(gSelectListDialog)
  18.     tempItemProps.type = #WindowBegin
  19.     append(myWindowItemList, duplicate(tempItemProps))
  20.     tempItemProps = GetItemPropList(gSelectListDialog)
  21.     setProp(tempItemProps, #attributes, [#valueList: glPFListNames])
  22.     tempItemProps.type = #PopupList
  23.     tempItemProps.locH = 115
  24.     tempItemProps.locV = 6
  25.     tempItemProps.width = 160
  26.     tempItemProps.height = 21
  27.     append(myWindowItemList, duplicate(tempItemProps))
  28.     tempItemProps = GetItemPropList(gSelectListDialog)
  29.     tempItemProps.type = #label
  30.     tempItemProps.value = "Select a List:"
  31.     setProp(tempItemProps, #attributes, [#justification: #left, #textStyle: [#plain]])
  32.     tempItemProps.locH = 14
  33.     tempItemProps.locV = 8
  34.     tempItemProps.width = 102
  35.     tempItemProps.height = 19
  36.     append(myWindowItemList, duplicate(tempItemProps))
  37.     tempItemProps = GetItemPropList(gSelectListDialog)
  38.     tempItemProps.type = #defaultPushButton
  39.     tempItemProps.title = "New List"
  40.     tempItemProps.locH = 135
  41.     tempItemProps.locV = 41
  42.     tempItemProps.width = 60
  43.     tempItemProps.height = 18
  44.     append(myWindowItemList, duplicate(tempItemProps))
  45.     tempItemProps = GetItemPropList(gSelectListDialog)
  46.     tempItemProps.type = #pushButton
  47.     tempItemProps.title = "Cancel"
  48.     tempItemProps.locH = 13
  49.     tempItemProps.locV = 41
  50.     tempItemProps.width = 60
  51.     tempItemProps.height = 18
  52.     append(myWindowItemList, duplicate(tempItemProps))
  53.     tempItemProps = GetItemPropList(gSelectListDialog)
  54.     tempItemProps.type = #WindowEnd
  55.     append(myWindowItemList, duplicate(tempItemProps))
  56.     Initialize(gSelectListDialog, [#windowPropList: SelectListDialogWinPropList, #windowItemList: myWindowItemList])
  57.   else
  58.   end if
  59. end
  60.  
  61. on SelectListDialogCallBack event, eventData, itemPropList
  62.   if symbolp(event) then
  63.     case event of
  64.       #itemChanged:
  65.         gCurrentList = itemPropList.value
  66.         stopSelectListDialog()
  67.       #itemClicked:
  68.         if itemPropList.title = "New List" then
  69.           stopSelectListDialog()
  70.         end if
  71.         if itemPropList.title = "Cancel" then
  72.           stopPersonalFile()
  73.         end if
  74.         if itemPropList.title = "Cancel" then
  75.           stopSelectListDialog()
  76.         end if
  77.       #windowOpening:
  78.       #windowClosed:
  79.       #windowZoomed:
  80.       #windowResized:
  81.       #itemEnteringFocus:
  82.       #itemLosingFocus:
  83.     end case
  84.   end if
  85. end
  86.  
  87. on runSelectListDialog
  88.   global gSelectListDialog
  89.   if objectp(gSelectListDialog) then
  90.     Run(gSelectListDialog)
  91.   end if
  92. end
  93.  
  94. on stopSelectListDialog
  95.   global gSelectListDialog
  96.   if objectp(gSelectListDialog) then
  97.     stop(gSelectListDialog, 0)
  98.   end if
  99.   go(the frame)
  100. end
  101.